<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html">
	<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="format-detection" content="telephone=no">
	<meta name="format-detection" content="email=no">
	<title>登录麦麦提</title>
	<link rel="stylesheet" href="css/register.css">
	<link rel="stylesheet" type="text/css" href="font_9bxjp1ahqrcw61or/iconfont.css"/>
	<script src="assets/flexible/flexible.debug.js"></script>
	<script src="assets/flexible/flexible_css.debug.js"></script>
	
</head>
<body>
	<div class="headertop">
		<i	 class="iconfont icon-qianjin-copy"></i>
		<div class="_top">登录麦麦提</div>
		<p></p>
 	</div>
			 
    <div class=" tab-nav">
    	<dl>
    		<dt><img src="imges/logo.jpg"/></dt>
    		<dd>
    			<ul class="_cheak">
		            <li class="_left">登录</li>
		            <li class="_right">注册</li>
		        </ul>
    		</dd>
    	</dl>
    </div>
    
    <div class="_bottom_1">
    	<div class="zhanghao">
    		<i class="iconfont icon-youxiang"></i>
            <input type="text" class="ipt_1" placeholder="请输入邮箱号码"/>
    	</div>
        <div class="mima">
    		<i class="iconfont icon-mima"></i>
            <input type="text" class="ipt_2" placeholder="请输入登录密码"/>
    	</div>	
        <div class="denglu">
        	<h3 class="btn1">登录</h3>
            <p class="_forget">忘记密码</p>
        </div>    
            
	</div>
    
    <div class="_bottom_2">
    	<div class="shouji">
    		<i class="iconfont icon-83"></i>
            <input type="text" class="ipt_1" placeholder="请输入手机号码"/>
    	</div>
    	<div class="zhanghao">
    		<i class="iconfont icon-youxiang"></i>
            <input type="text" class="ipt_2" placeholder="请输入邮箱号码"/>
            <span>获取验证码</span>
    	</div>
        <div class="mima">
    		<i class="iconfont icon-mima"></i>
            <input type="text" class="ipt_3" placeholder="请输入登录密码"/>
    	</div>	
        <div class="denglu">
        	<p>点击填写推荐码</p>
        	<h3 class="btn2">注册</h3>
        </div>    
            
	</div>
    
    <script src="js/jquery-3.2.1.js"></script>
     <script>
        jQuery(function($){
            $('._cheak').click(function(e){
            	if (e.target.className === "_right") {
            		$("._bottom_1").hide()
            		$("._bottom_2").show();
            	}
            	if (e.target.className === "_left") {
            		$("._bottom_1").show();
            		$("._bottom_2").hide();
            	}
            })
            
            function get(name){
				return	localStorage.getItem(name);
			}
           $(".btn1").click(function(){
							var	yonghu =$("._bottom_1 .ipt_1").val();
							var	mima  = $("._bottom_1 .ipt_2").val();
								
								   var infos = get("infos");
									infos = JSON.parse(infos); 
							        console.log(infos)
								$.each(infos, function(i,n) {
									       admin=    n.user;
									       pass =  n.pas; 
								});
								if(infos==null){
									alert("密码或用户名错误")
								}else if(yonghu==admin&& mima==pass){
									alert("登录成功")
									location.href = "yideng.html"
								} else{
									alert("密码或用户名错误")
								}
			})	
			
			
			
		
				$("._forget").on("touchstart",function(){
					location.href = "forget password.html"
			
			})
        })
        
    </script>
</body>
</html>
